﻿<Page x:Class="SsTool.RoleListPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="500"
	Title="RoleListPage">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" HorizontalAlignment="Left" Orientation="Horizontal">
            <Button Name="_ctlBtnCreate" Content="Create" Click="_ctlBtnCreate_Click" Margin="5" />
            <Button Name="_ctlBtnUpdate" Content="Update" Click="_ctlBtnUpdate_Click" Margin="5" />
            <Button Name="_ctlBtnDelete" Content="Delete" Click="_ctlBtnDelete_Click" Margin="5" />
            <Button Name="_ctlBtnAssign" Content="Assign User" Click="_ctlBtnAssign_Click" Margin="5" />
        </StackPanel>
        <Border Grid.Row="1" BorderThickness="1" BorderBrush="Black" Margin="5">
            <DataGrid Name="_ctlGridRole" BorderThickness="0" CanUserAddRows="False" IsReadOnly="True" AutoGenerateColumns="False">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="编号" Binding="{Binding Path=Name}"/>
                    <DataGridTextColumn Header="名称" Binding="{Binding Path=Caption}"/>
                    <DataGridTemplateColumn>
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Button Content="设置用户" Click="Button_Click"/>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                </DataGrid.Columns>
            </DataGrid>
        </Border>

    </Grid>
</Page>
